package cn.kbyue.ormdemo.entity.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

/**
 * @author xlang
 * @date 2023/4/12 10:23
 */
@Getter
public enum GenderEnum {

    /**
     * 用户性别
     */
    MALE(1, "男"),
    FEMALE(2, "女")
    ;

    @EnumValue
    @JsonValue
    private final Integer code;
    private final String name;

    GenderEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

}
